﻿using System;
using System.Collections.Generic;

public class CharacterComparer : IComparer<Characters>
{
    public int Compare(Characters characterA, Characters characterB)
    {
        if (characterA == characterB)
        {
            return 0;
        }
        if (characterA.Position.Y <= characterB.Position.Y)
        {
            return -1;
        }
        return 1;
    }
}